package com.kgc.pojo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DiscountExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DiscountExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andDiscountnumIsNull() {
            addCriterion("discountNum is null");
            return (Criteria) this;
        }

        public Criteria andDiscountnumIsNotNull() {
            addCriterion("discountNum is not null");
            return (Criteria) this;
        }

        public Criteria andDiscountnumEqualTo(String value) {
            addCriterion("discountNum =", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumNotEqualTo(String value) {
            addCriterion("discountNum <>", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumGreaterThan(String value) {
            addCriterion("discountNum >", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumGreaterThanOrEqualTo(String value) {
            addCriterion("discountNum >=", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumLessThan(String value) {
            addCriterion("discountNum <", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumLessThanOrEqualTo(String value) {
            addCriterion("discountNum <=", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumLike(String value) {
            addCriterion("discountNum like", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumNotLike(String value) {
            addCriterion("discountNum not like", value, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumIn(List<String> values) {
            addCriterion("discountNum in", values, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumNotIn(List<String> values) {
            addCriterion("discountNum not in", values, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumBetween(String value1, String value2) {
            addCriterion("discountNum between", value1, value2, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnumNotBetween(String value1, String value2) {
            addCriterion("discountNum not between", value1, value2, "discountnum");
            return (Criteria) this;
        }

        public Criteria andDiscountnameIsNull() {
            addCriterion("discountName is null");
            return (Criteria) this;
        }

        public Criteria andDiscountnameIsNotNull() {
            addCriterion("discountName is not null");
            return (Criteria) this;
        }

        public Criteria andDiscountnameEqualTo(String value) {
            addCriterion("discountName =", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameNotEqualTo(String value) {
            addCriterion("discountName <>", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameGreaterThan(String value) {
            addCriterion("discountName >", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameGreaterThanOrEqualTo(String value) {
            addCriterion("discountName >=", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameLessThan(String value) {
            addCriterion("discountName <", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameLessThanOrEqualTo(String value) {
            addCriterion("discountName <=", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameLike(String value) {
            addCriterion("discountName like", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameNotLike(String value) {
            addCriterion("discountName not like", value, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameIn(List<String> values) {
            addCriterion("discountName in", values, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameNotIn(List<String> values) {
            addCriterion("discountName not in", values, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameBetween(String value1, String value2) {
            addCriterion("discountName between", value1, value2, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountnameNotBetween(String value1, String value2) {
            addCriterion("discountName not between", value1, value2, "discountname");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceIsNull() {
            addCriterion("discountPrice is null");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceIsNotNull() {
            addCriterion("discountPrice is not null");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceEqualTo(BigDecimal value) {
            addCriterion("discountPrice =", value, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceNotEqualTo(BigDecimal value) {
            addCriterion("discountPrice <>", value, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceGreaterThan(BigDecimal value) {
            addCriterion("discountPrice >", value, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("discountPrice >=", value, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceLessThan(BigDecimal value) {
            addCriterion("discountPrice <", value, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("discountPrice <=", value, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceIn(List<BigDecimal> values) {
            addCriterion("discountPrice in", values, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceNotIn(List<BigDecimal> values) {
            addCriterion("discountPrice not in", values, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("discountPrice between", value1, value2, "discountprice");
            return (Criteria) this;
        }

        public Criteria andDiscountpriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("discountPrice not between", value1, value2, "discountprice");
            return (Criteria) this;
        }

        public Criteria andStarttimeIsNull() {
            addCriterion("startTime is null");
            return (Criteria) this;
        }

        public Criteria andStarttimeIsNotNull() {
            addCriterion("startTime is not null");
            return (Criteria) this;
        }

        public Criteria andStarttimeEqualTo(Date value) {
            addCriterion("startTime =", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotEqualTo(Date value) {
            addCriterion("startTime <>", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeGreaterThan(Date value) {
            addCriterion("startTime >", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeGreaterThanOrEqualTo(Date value) {
            addCriterion("startTime >=", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeLessThan(Date value) {
            addCriterion("startTime <", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeLessThanOrEqualTo(Date value) {
            addCriterion("startTime <=", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeIn(List<Date> values) {
            addCriterion("startTime in", values, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotIn(List<Date> values) {
            addCriterion("startTime not in", values, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeBetween(Date value1, Date value2) {
            addCriterion("startTime between", value1, value2, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotBetween(Date value1, Date value2) {
            addCriterion("startTime not between", value1, value2, "starttime");
            return (Criteria) this;
        }

        public Criteria andEndtimeIsNull() {
            addCriterion("endTime is null");
            return (Criteria) this;
        }

        public Criteria andEndtimeIsNotNull() {
            addCriterion("endTime is not null");
            return (Criteria) this;
        }

        public Criteria andEndtimeEqualTo(Date value) {
            addCriterion("endTime =", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotEqualTo(Date value) {
            addCriterion("endTime <>", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeGreaterThan(Date value) {
            addCriterion("endTime >", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeGreaterThanOrEqualTo(Date value) {
            addCriterion("endTime >=", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeLessThan(Date value) {
            addCriterion("endTime <", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeLessThanOrEqualTo(Date value) {
            addCriterion("endTime <=", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeIn(List<Date> values) {
            addCriterion("endTime in", values, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotIn(List<Date> values) {
            addCriterion("endTime not in", values, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeBetween(Date value1, Date value2) {
            addCriterion("endTime between", value1, value2, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotBetween(Date value1, Date value2) {
            addCriterion("endTime not between", value1, value2, "endtime");
            return (Criteria) this;
        }

        public Criteria andDConditionIsNull() {
            addCriterion("d_condition is null");
            return (Criteria) this;
        }

        public Criteria andDConditionIsNotNull() {
            addCriterion("d_condition is not null");
            return (Criteria) this;
        }

        public Criteria andDConditionEqualTo(String value) {
            addCriterion("d_condition =", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionNotEqualTo(String value) {
            addCriterion("d_condition <>", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionGreaterThan(String value) {
            addCriterion("d_condition >", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionGreaterThanOrEqualTo(String value) {
            addCriterion("d_condition >=", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionLessThan(String value) {
            addCriterion("d_condition <", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionLessThanOrEqualTo(String value) {
            addCriterion("d_condition <=", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionLike(String value) {
            addCriterion("d_condition like", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionNotLike(String value) {
            addCriterion("d_condition not like", value, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionIn(List<String> values) {
            addCriterion("d_condition in", values, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionNotIn(List<String> values) {
            addCriterion("d_condition not in", values, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionBetween(String value1, String value2) {
            addCriterion("d_condition between", value1, value2, "dCondition");
            return (Criteria) this;
        }

        public Criteria andDConditionNotBetween(String value1, String value2) {
            addCriterion("d_condition not between", value1, value2, "dCondition");
            return (Criteria) this;
        }

        public Criteria andStatusidIsNull() {
            addCriterion("statusId is null");
            return (Criteria) this;
        }

        public Criteria andStatusidIsNotNull() {
            addCriterion("statusId is not null");
            return (Criteria) this;
        }

        public Criteria andStatusidEqualTo(Integer value) {
            addCriterion("statusId =", value, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidNotEqualTo(Integer value) {
            addCriterion("statusId <>", value, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidGreaterThan(Integer value) {
            addCriterion("statusId >", value, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidGreaterThanOrEqualTo(Integer value) {
            addCriterion("statusId >=", value, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidLessThan(Integer value) {
            addCriterion("statusId <", value, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidLessThanOrEqualTo(Integer value) {
            addCriterion("statusId <=", value, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidIn(List<Integer> values) {
            addCriterion("statusId in", values, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidNotIn(List<Integer> values) {
            addCriterion("statusId not in", values, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidBetween(Integer value1, Integer value2) {
            addCriterion("statusId between", value1, value2, "statusid");
            return (Criteria) this;
        }

        public Criteria andStatusidNotBetween(Integer value1, Integer value2) {
            addCriterion("statusId not between", value1, value2, "statusid");
            return (Criteria) this;
        }

        public Criteria andUseridIsNull() {
            addCriterion("userId is null");
            return (Criteria) this;
        }

        public Criteria andUseridIsNotNull() {
            addCriterion("userId is not null");
            return (Criteria) this;
        }

        public Criteria andUseridEqualTo(Integer value) {
            addCriterion("userId =", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridNotEqualTo(Integer value) {
            addCriterion("userId <>", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridGreaterThan(Integer value) {
            addCriterion("userId >", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridGreaterThanOrEqualTo(Integer value) {
            addCriterion("userId >=", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridLessThan(Integer value) {
            addCriterion("userId <", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridLessThanOrEqualTo(Integer value) {
            addCriterion("userId <=", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridIn(List<Integer> values) {
            addCriterion("userId in", values, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridNotIn(List<Integer> values) {
            addCriterion("userId not in", values, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridBetween(Integer value1, Integer value2) {
            addCriterion("userId between", value1, value2, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridNotBetween(Integer value1, Integer value2) {
            addCriterion("userId not between", value1, value2, "userid");
            return (Criteria) this;
        }

        public Criteria andDiscountformIsNull() {
            addCriterion("discountForm is null");
            return (Criteria) this;
        }

        public Criteria andDiscountformIsNotNull() {
            addCriterion("discountForm is not null");
            return (Criteria) this;
        }

        public Criteria andDiscountformEqualTo(String value) {
            addCriterion("discountForm =", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformNotEqualTo(String value) {
            addCriterion("discountForm <>", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformGreaterThan(String value) {
            addCriterion("discountForm >", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformGreaterThanOrEqualTo(String value) {
            addCriterion("discountForm >=", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformLessThan(String value) {
            addCriterion("discountForm <", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformLessThanOrEqualTo(String value) {
            addCriterion("discountForm <=", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformLike(String value) {
            addCriterion("discountForm like", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformNotLike(String value) {
            addCriterion("discountForm not like", value, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformIn(List<String> values) {
            addCriterion("discountForm in", values, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformNotIn(List<String> values) {
            addCriterion("discountForm not in", values, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformBetween(String value1, String value2) {
            addCriterion("discountForm between", value1, value2, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountformNotBetween(String value1, String value2) {
            addCriterion("discountForm not between", value1, value2, "discountform");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailIsNull() {
            addCriterion("discountDetail is null");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailIsNotNull() {
            addCriterion("discountDetail is not null");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailEqualTo(String value) {
            addCriterion("discountDetail =", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailNotEqualTo(String value) {
            addCriterion("discountDetail <>", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailGreaterThan(String value) {
            addCriterion("discountDetail >", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailGreaterThanOrEqualTo(String value) {
            addCriterion("discountDetail >=", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailLessThan(String value) {
            addCriterion("discountDetail <", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailLessThanOrEqualTo(String value) {
            addCriterion("discountDetail <=", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailLike(String value) {
            addCriterion("discountDetail like", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailNotLike(String value) {
            addCriterion("discountDetail not like", value, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailIn(List<String> values) {
            addCriterion("discountDetail in", values, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailNotIn(List<String> values) {
            addCriterion("discountDetail not in", values, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailBetween(String value1, String value2) {
            addCriterion("discountDetail between", value1, value2, "discountdetail");
            return (Criteria) this;
        }

        public Criteria andDiscountdetailNotBetween(String value1, String value2) {
            addCriterion("discountDetail not between", value1, value2, "discountdetail");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}